package com.wang.mall.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wang.mall.bean.Product;
import org.apache.ibatis.annotations.Param;

public interface ProductMapper extends BaseMapper<Product> {
    Long getSkuStock(@Param("item") Long item);

    Long lockProductStock(@Param("product") Product product, @Param("count") Integer count);

    /**
     * 解锁库存
     * @param skuId
     * @param skuNum
     * @return
     */
    int unLockStock(@Param("skuId") Long skuId, @Param("skuNum") Integer skuNum);
}
